package com.dk.service.impl;

import com.dk.data.PageBean;
import com.dk.entity.TGoods;
import com.dk.entity.TRepayment;
import com.dk.mapper.TRepaymentMapper;
import com.dk.mapper.TStagingMapper;
import com.dk.service.ITRepaymentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2021-11-02
 */
@Service
public class TRepaymentServiceImpl extends ServiceImpl<TRepaymentMapper, TRepayment> implements ITRepaymentService {
    @Autowired
    private TRepaymentMapper repaymentMapper;
    @Override
    public PageBean findAllByRepayment(Integer num, Integer size) {
            PageBean page=new PageBean();
            page.setPageNumber(num);
            page.setPageSize(size);
            List<TGoods> carList= repaymentMapper.findAllByRepayment(page.getStartIndex(),page.getPageSize());
            page.setList(carList);
            Integer count=repaymentMapper.getTotalCount();
            page.setTotalCount(count);
            return page;
    }
}
